﻿#include <iostream>
#include"caculator.h"
using namespace std;


int main()
{
	caculator c;
	double num1;
	double num2;
	char oper;   //运算符
	cout << "请输入两个数字：";
	cin >> num1;
	cin >> num2;
	cout << endl;
	cout << "请输入运算符：";
	cin >> oper;
	while (true)
	{
		if (oper == '+')
		{
			c.addShow(num1, num2);
			break;
		}
		else if (oper == '-')
		{
			c.minusShow(num1, num2);
			break;
		}
		else if (oper == '*')
		{
			c.mulShow(num1, num2);
			break;
		}
		else if (oper == '/')
		{
			c.divShow(num1, num2);
			break;
		}
		else
		{
			cout << "输入运算符错误,请重新输入：";
			cin >> oper;
		}
	}

	return 0;
}


